package com.wzw.shoppingcart.vo;

import lombok.Data;

/**
 * @author wzw
 *  2022/9/10
 */
@Data
public class Result<T> {
    private String code;
    private String msg;
    private T data;

    public Result(T data) {
        this.data = data;
    }

    public static <T> Result<T> success(T data) {
        Result<T> result = new Result<>(data);
        result.setCode("200");
        result.setMsg("success");
        return result;
    }

}
